
import React, { Component } from 'react';// 各种包一定要注意导入
import {
    Platform,
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity,
    ScrollView
} from 'react-native';
import Slider from '../../com/Slider';
import NavigatorBar from '../../com/NavigationBar';
import Icon from 'react-native-vector-icons/FontAwesome';

class Home_02 extends Component {


    constructor(props) {
        super(props);
    }

    render() {
        return (
            <View style={styles.appContainer}>

                <NavigatorBar
                    title={'首页'}
                    style={styles.navigatorBar}
                    leftButton={this.renderLeftButton('')}
                    rightButton={this.renderRightButton('')}
                />

                <ScrollView>
                    <View style={{ height: 300, backgroundColor: 'red' }}>
                        <View style={{ height: 128, justifyContent: 'center' }}>
                            <Slider />
                        </View>
                        <View style={{ flex: 1 }}>
                            <Image style={{ height: 100, width: 60, resizeMode: 'cover', backgroundColor: 'red' }} source={{ uri: 'http://res.cjzww.com/image/book/cover/6/99/69970.jpg' }} ></Image>
                        </View>
                    </View>

                </ScrollView>








            </View>
        );
    }

    // 渲染按钮
    renderLeftButton(image) {
        return <TouchableOpacity
            onPress={() => {
                this.props.navigator.pop();
            }}>
            <Icon name="angle-left" size={24} color="#333" />

        </TouchableOpacity>;
    }

    renderRightButton(image) {
        return <TouchableOpacity
            onPress={() => this.goToSearchPage()}
            style={{ padding: 8 }}
        >
        </TouchableOpacity>;
    }


}

const styles = StyleSheet.create({
    appContainer: {
        flex: 1
    },
    navigatorBar: {
        
    }
});

export default Home_02;